package oop4.pet;

import oop4.Pet;

/**
 * @author oldliu
 * @since 1.0
 */
public class Parrot extends Pet {

    public Parrot(String name){
        super.setName(name);
    }

    public void fly(){
        System.out.println(super.getName()+"鹦鹉会飞");
    }

    @Override//就是重写标志
    public void print() {
        System.out.println("这是一只鹦鹉，名字叫"+super.getName());
        //super.print();
    }
}
